package com.example.manu_facturer_orders.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.manu_facturer_orders.pojo.ManuFacturerVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: tobed
 * @date: 2022/9/8
 * @time: 8:19
 */
@Mapper
public interface ManuFacturerMapper {


    /**
     * 厂商全查
     * @return
     */
    Page<ManuFacturerVO> listManuFacturer(
            @Param("manufacturerCode") String manufacturerCode,
            @Param("manufacturerType") String manufacturerType,
            @Param("manufacturerUseType") String manufacturerUseType,
            Page<ManuFacturerVO> page);


    /**
     * 自定注册厂商全查
     * @return
     */
    Page<ManuFacturerVO> listNoManuFacturer(
            @Param("manufacturerCode") String manufacturerCode,
            @Param("manufacturerType") String manufacturerType,
            @Param("manufacturerUseType") String manufacturerUseType,
            Page<ManuFacturerVO> page);


    /**
     * 停用/启用
     * @param id
     * @param manufacturerUseType
     * @return
     */
    int closeManuFacturer(@Param("id") Integer id, @Param("manufacturerUseType") Integer manufacturerUseType);

    /**
     * 自行注册厂商全查无分页
     * @return
     */
    List<ManuFacturerVO> listNo();


    /**
     * 签约厂商
     * @param contractStartDate
     * @param contractEndDate
     * @return
     */
    int contractManuFacturer(@Param("contractStartDate") String contractStartDate,@Param("contractEndDate") String contractEndDate,@Param("id") Integer id);

    /**
     * 处理自注册厂商
     * @param id
     * @param manufacturerDelMessage
     * @return
     */
    int dealManuFacturer(@Param("id") Integer id,@Param("manufacturerDelMessage") String manufacturerDelMessage,@Param("manufacturerDelType") Integer manufacturerDelType);


    /**
     * 单查名称
     * @param id
     * @return
     */
    ManuFacturerVO getNameByPkid(@Param("id") Integer id);

    /**
     * 真全查
     * @return
     */
    List<ManuFacturerVO> allList();

    /**
     * 解约厂商
     * @param id
     * @return
     */
    int jieyueFactur(@Param("id") Integer id);

}
